import matplotlib.pyplot as plt
import axislines
import matplotlib.transforms as mtransforms

if __name__ == "__main__":

    fig = plt.figure(1)
    fig.clf()
    SubplotZero = axislines.SubplotZero
    plt.ioff()
    fig.subplots_adjust(right=0.85)
    ax = SubplotZero(fig, 1, 1, 1)
    #ax.frame.set_visible(False)
    ax.axislines["xzero"].set_visible(True)
    fig.add_subplot(ax)
    ax.set_ylim(-2, 4)
    ax.axislines["bottom"].label.set_text("Label X")
    ax.axislines["left"].label.set_text("Label Y")

    offset_transform = mtransforms.Affine2D().translate(20, 0)
    axisline = ax._grid_helper.get_axisline
    ax.axislines["right2"] = axisline(loc="right",
                                      offset_transform=offset_transform)
    ax.axislines["right2"].label.set_text("Label 2")

    plt.ion()
    plt.draw()
